package com.cloud.pole.shop.biz.order;

import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;

import org.apache.ibatis.annotations.Options;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.ace.cache.annotation.Cache;
import com.ace.cache.annotation.CacheClear;
import com.cloud.pole.common.biz.BaseBiz;
import com.cloud.pole.mapper.order.ShopOrderDeliveryMapper;
import com.cloud.pole.shop.model.entity.order.ShopOrder;
import com.cloud.pole.shop.model.entity.order.ShopOrderDelivery;

/**
 * ${DESCRIPTION}
 *
 * @author wanghaobin
 * @create 2017-06-08 16:23
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class ShopOrderDeliveryBiz extends BaseBiz<ShopOrderDeliveryMapper, ShopOrderDelivery> {
	
	@Autowired
	ShopOrderDeliveryMapper ShopOrderDeliveryMapper;
	
	@Cache(key="shopOrderDelivery:orderSn{1}")
    public ShopOrderDelivery selectByOrderSn(String orderSn) {
		ShopOrderDelivery msg = new ShopOrderDelivery();
		msg.setOrderSn(orderSn);
        return super.selectOne(msg);
    }
	
	@Override
    public void insertSelective(ShopOrderDelivery entity) {
    	super.insertSelective(entity);
    }
	
	@Override
	@CacheClear(key="shopOrderDelivery:orderSn{1.orderSn}")
    public void updateSelectiveById(ShopOrderDelivery entity) {
    	super.updateSelectiveById(entity);
    }
}
